<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>在特定日期的特定时段显示打折促销信息</title>

</head>

<body>
<script>
  var dq_now = new Date();
  var dq_year = dq_now.getFullYear();
  var dq_month = dq_now.getMonth()+1;
  var dq_day = dq_now.getDate();
  var dq_houre =dq_now.getHours();
  var dq_min=dq_now.getMinutes();	
  var dq_sec=dq_now.getSeconds();
  var timeout=new Date(dq_year+"/"+dq_month+"/"+dq_day+" "+dq_houre+":"+dq_min+":"+dq_sec);
  document.write ('当前的日期为：'+timeout.toLocaleString());
  
  if(dq_month==5){
	  if(dq_day>=1 && dq_day<=5 || dq_day>=26 && dq_day<=30){
		 document.write ('<br />'+'正在促销打折，请关注！');
	  }
	  else
	  {
		  document.write ('<br />'+'促销打折暂未开始，请留意！');
	  }
  }
  else{
	  document.write ('<br />'+'请关注促销活动');
  }
</script>

</body>
</html>
